<template>
    <div class="login_box">
        <div class="main_box">
            <div class="close_box" onclick="toggleLogin()">
                <img src="/image/dialog_close.svg" alt="关闭">
            </div>
            <div class="logo_box"><img src="/image/logo.webp" alt="标识"></div>
            <form class="form_box" onsubmit="login(event, '')">
                <div class="form_title">会员登录</div>
                <div class="form_item">
                    <img class="icon" src="/image/username_icon.svg" alt="用户名">
                    <input name="login_name" placeholder="请输入邮箱地址">
                    <img class="option" src="/image/clear_input_icon.svg" alt="清除" onclick="clearInput('login_name')">
                </div>
                <div class="form_item">
                    <img class="icon" src="/image/password_icon.svg" alt="密码">
                    <input name="login_password" type="password" placeholder="密码" autocomplete="on">
                    <img class="option" src="/image/close_eye_icon.svg" alt="显示" onclick="showPassword(this,'login_password', '')">
                </div>
                <div class="option_box">
                    <span class="txt" onclick="(()=>{
                        toggleLogin();
                        publish({code: 3});
                    })()">忘记密码</span>
                    <span class="txt" onclick="(()=>{
                        toggleLogin();
                        publish({code: 2});
                    })()">免费注册会员&nbsp;
                        <img src="/image/more.svg" alt="点击">
                    </span>
                </div>
                <div>
                    <button type="submit" class="login_btn">登录</button>
                </div>
            </form>
        </div>
    </div>
</template>